package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.PermitCodeModel;
import com.iris.live.services.data.models.PermitCodeModelPK;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by wzy on 2017/8/23.
 */
public interface PermitCodeRepository extends JpaRepository<PermitCodeModel,PermitCodeModelPK>,JpaSpecificationExecutor<PermitCodeModel> {

    @Query("select a from PermitCodeModel a where a.permit = ?1")
    PermitCodeModel findByPermit(String permit);

}
